package cc.decat.escript.ir;

import cc.decat.escript.ir.expression.Expression;
import cc.decat.escript.ir.expression.VariableExpression;

// 左值类型
public class AssignableNode extends Node {


    public enum Type {
        Variable,
        ListIndex,
        MemberAttribute,
    }

    private Type type;

    // Variable
    private String variableName;

    // ListIndex
    private Node listExpression;
    private Node indexExpression;

    // MemberDot
    private Node objectExpression;
    private String attributeName;

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public String getVariableName() {
        return variableName;
    }

    public void setVariableName(String variableName) {
        this.variableName = variableName;
    }

    public Node getListExpression() {
        return listExpression;
    }

    public void setListExpression(Node listExpression) {
        this.listExpression = listExpression;
    }

    public Node getIndexExpression() {
        return indexExpression;
    }

    public void setIndexExpression(Node indexExpression) {
        this.indexExpression = indexExpression;
    }

    public Node getObjectExpression() {
        return objectExpression;
    }

    public void setObjectExpression(Node objectExpression) {
        this.objectExpression = objectExpression;
    }

    public String getAttributeName() {
        return attributeName;
    }

    public void setAttributeName(String attributeName) {
        this.attributeName = attributeName;
    }

    @Override
    public void accept(Visitor visitor) {

    }
}
